<template>
  <div class="loading-box" v-show="show">
    <div class="loading-mask"></div>
    <div class="loading-content">
      <div class="animation">
        <img class="loading-img" src="../assets/image/loading.gif" alt="">
      </div>
      <div class="text">{{text}}</div>
    </div>
  </div>
</template>

<script>
  export default {
    props:{
      show: {
        type: Boolean,
        default: false
      },
      text:{
        type: String,
        default: "正在加载中..."
      },

    }
  }
</script>

<style scoped="">
  .loading-box {
    z-index: 10000!important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    text-align: center;
  }
  .loading-mask {
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.7);
  }
  .loading-content{
    position: fixed;
    top: 50%;
    left:50%;
    transform: translate(-50%,-50%);
  }
  .loading-img {
    width: 230px;
    height: 190px;
  }
  .text {
    color: #888888;
    font-size: 16px;
  }
</style>
